package com.itany.mapper;

import com.itany.pojo.BookSupplier;
import com.itany.pojo.Supplier;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BookSupplierMapper {


    /**
     * 根据bookId查找数据
     * @param bookId
     * @return
     */
    List<BookSupplier> selectByBook(Integer bookId);

    /**
     * 根据bookId查找供应商信息
     * @param bookId
     * @return
     */
    List<Supplier> selectSuppliersByBook(Integer bookId);
    /**
     * 根据bookId和supplierId查找数据
     * @return
     */
    BookSupplier selectByBookAndSupplier(BookSupplier bookSupplier);

    /**
     * 根据supplierid查找书籍
     */
    List<BookSupplier> selectBooksBySupplier(@Param("supplierId") Integer supplierId,@Param("booknameKey") String booknameKey,@Param("ISBNKey") String ISBNKey);

    /**
     * 更新图书供求信息
     */
    void updateBookSupplier(BookSupplier bookSupplier);

    /**
     * 添加图书供求信息
     */
    void insertBookSupplier(BookSupplier bookSupplier);
}
